<div ng-include="sys_html('common/_header','','','jy_weishop')"></div>
<style>
    .yen{border:none;height:0.75rem;width:0.75rem;display: inline-block;background: #ff4753;color:#fff;font-size:0.4rem;line-height: 0.8rem;text-align: center;
        font-style: normal;border-radius: 0.75rem;-webkit-border-radius: 0.75rem;}
    .order-create-page .fui-list.goods-item .fui-list-inner{
        height: 3.5rem;
        align-self: center;
    }
    .order-create-page .fui-list.goods-item .fui-list-angle{
        height: 3.5rem;
        align-self: center;
    }
    .order-create-page .fui-list-inner .subtitle{
        display: block;
    }
    .fui-header a.back2:before {
        content: " ";
        display: inline-block;
        -webkit-transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        transform: rotate(45deg);
        height: 0.5rem;
        width: 0.5rem;
        border-width: 0 0 2px 2px;
        border-color: #666;
        border-style: solid;
        position: relative;
        top:0;
    }
.fui-btn-c {
    height: auto;
    margin: 0;
    padding: 0.4rem;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
	justify-content:center;
    align-items: center;
    position: relative;
}

.fui-btn-c .icon {
	font-size:1rem;
	padding-right:0.3rem;
	text-align:right;
}

.fui-btn-c .info {
	text-align:left;
    padding-right: 0.2rem;
    font-size: 0.75rem;
}

.fui-btn-c .info p {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.jylabel-red-0.active::after{content:" ";width:23px;height:24px;background:url(../core/resource/images/gou-red.png) no-repeat;position:absolute;float:right;right:-1px;bottom:-1px;text-align:center;}
.parent-category{float:left; width:100%; height:auto; min-height:100%;}
.parent-category ul{margin:0; padding:0; width:100%;}
.parent-category ul li{list-style:none; text-align:center; height:50px; line-height:50px; white-space:nowrap; width:100%; border-bottom:1px solid #e0e0e0; position:relative; right:-1px;}
.parent-category ul li.active{border-right:1px solid #fff; z-index: 10000}
.parent-category ul li a{color:#333; display:inline-block; width:100%; height:100%; text-decoration:none;}
.parent-category ul li.active a{color:#09ba07;}
.children-category{width:100%; min-height:100%; height:auto; color: #252525;}
.children-category ul{list-style:none; margin:0; padding:0; overflow-y:auto; overflow-x:hidden; border-left:1px solid #e0e0e0; min-height:100%;}
.children-category ul li{text-align:left; height: 32px; line-height: 32px; padding-left: 15px}
.children-category ul li.delivery-tips{height:25px; margin-top: -15px; font-size: .65rem; color: #ff2d4b}
.children-category ul li a{display:inline-block; width:100%; height:100%; text-decoration:none; color:#333;}
.children-category ul li a span{font-size: .6rem; color: #999;}
.children-category .block{display:block; color:#ef1e15; font-size:.6rem;}
.fui-navbar .cartbtn {padding-right:0.3rem;background:#fff;opacity:1}
.fui-navbar .buybtn  {padding-left:0.3rem;background:#fff}
.fee-tag-nav, .fee-tagup-nav, .fee-disabled-nav {border-radius:1rem;height:2rem;line-height:2rem;color:#fff;width:100%;font-weight:400;font-size:0.7rem;margin:0.2rem 0;padding:0 0.2rem}
.fee-tagup {background:{{main.syscolor || 'red'}};color:#fff;width:auto;font-weight:400;font-size:0.55rem}
.fee-tag-nav {background:{{main.syscolor || 'red'}}; opacity: 0.58;}
.fee-tagup-nav {background:{{main.syscolor || 'red'}};}
.fee-disabled-nav {background:#bbb;color:#fff;}	
</style>
<div class='fui-page order-create-page' ng-if="pagedata.nodatapic_close">
    <div class='fui-content'>	
        <div ng-if="pagedata.sendtypes" id="carrierTab" class="fui-tab fui-tab-danger" style="margin-bottom: 0">
            <a ng-repeat="(k,v) in pagedata.sendtypes" ng-class="{'active':pagedata.post.sendtype==k}" ng-click="pagedata.post.sendtype=k">{{v}}</a>
        </div>
		<!--地址选择-->
		<div id="addressInfo" ng-show="pagedata.post.sendtype==1" class="fui-cell-group fui-address-group" style="margin-top:0px">
			<div ng-if="pagedata.post.addressid" class="fui-cell" ng-click="pagedata.get_addresslist()">
				<div style="width:100%">
					<div class="fui-cell-text name bold" style="font-size:0.8rem">
						<span style="margin-right:20px">{{pagedata.post.address.name}}</span><span>{{pagedata.post.address.mobile}}</span>
					</div>
					<div class="fui-cell-text name" style="margin-top:5px">	
						<i class="fui-tag fui-tag-red">默认</i>
						<i class="fui-tag fui-tag-blue">家</i>
						{{pagedata.post.address.pcd.province||''}} {{pagedata.post.address.pcd.city ||''}} {{pagedata.post.address.pcd.district||''}} {{pagedata.post.address.address ||''}}
					</div>
				</div>
				<div class="fui-cell-remark"></div>
			</div>
			<div ng-if="!pagedata.post.addressid && pagedata.mid>0" class="fui-cell">
				<div class="fui-list-inner" ng-click="pagedata.edit_address=1">
						<div class="text no-address" style="width:8rem"><i class="icon jinyunicon icon-tianjia"></i> {{pagedata.item.isnoarea==1?'默认地址不在上门范围,需另加':'添加上门地址'}}</div>
				</div>
			</div>
			<div ng-if="pagedata.mid==0" class='fui-cell-group'>
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:auto;font-size:0.9rem">上门信息</div>
					<div class='fui-cell-info'></div>
				</div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>联系人</div>
                    <div class='fui-cell-info'><input type="text" ng-model="pagedata.post.address.name" placeholder="联系人" class="fui-input"/></div>
                </div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>联系电话</div>
                    <div class='fui-cell-info'><input type="tel" ng-model="pagedata.post.address.mobile" placeholder="联系电话"  class="fui-input"/></div>
                </div>
                <div class="fui-cell">
					<div class="fui-cell-label ">地区</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.post.address.pcd.province" class="form-control tpl-province">
						<option value="" selected="selected">省份</option>
						<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.post.address.pcd.province==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.post.address.pcd.city" class="form-control tpl-city">
						<option value="" selected="selected">城市</option>
						<option ng-repeat="(value,data) in pagedata.province[pagedata.post.address.pcd.province]" value="{{value}}" ng-selected="pagedata.post.pcd.city==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.post.address.pcd.district" class="form-control tpl-district">
						<option value="" selected="selected">区县</option>
						<option ng-repeat="(value,data) in pagedata.province[pagedata.post.address.pcd.province][pagedata.post.address.pcd.city]" value="{{value}}" ng-selected="pagedata.post.address.pcd.district==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.post.address.pcd.street" class="form-control tpl-district">
						<option value="" selected="selected">街道</option>
						<option ng-repeat="value in pagedata.province[pagedata.post.address.pcd.province][pagedata.post.address.pcd.city][pagedata.post.address.pcd.district]" value="{{value}}" ng-selected="pagedata.post.address.pcd.street==value">{{value}}</option>
						</select>
					</div>
				</div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>详细地址</div>
                    <div class='fui-cell-info'><input type="text" ng-model="pagedata.post.address.address" placeholder='街道，楼牌号等'  class="fui-input"/></div>
                </div>
            </div>
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:100px">期望上门时间</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark bold" ng-click="pagedata.selecttime();pagedata.post.make_type=1" >
				<span ng-if="!pagedata.post.out_time" class='dispatchprice'>
					选择上门时间
				</span>
				<span ng-if="pagedata.post.out_time" class='dispatchprice'>
					约{{pagedata.post.out_time}}上门
				</span>
				</div>
			</div>
		</div>
	<!--自提点选择-->
	<div ng-show="pagedata.post.sendtype==2" class="fui-list-group"  id="carrierInfo" style="margin: 0 0 0.5rem">
					<a ng-if="!pagedata.merch" class="fui-list" href="javascript:;" onclick="$('#showstores').modal();">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="subtitle" >
								<span style="overflow: hidden;display: inline-block;">门店：</span>
								<span class='realname'>{{pagedata.selectstore.title}}</span>
								
							</div>
							<div class="text address">地址：<span style="color:{{main.syscolor || 'red'}}">{{pagedata.selectstore.pcd.city}}</span>({{pagedata.selectstore.pcd.district}} {{pagedata.selectstore.pcd.street}} {{pagedata.selectstore.address}})</div>
						</div>
						<div class="fui-list-angle">
							<div class="angle"></div>
						</div>
					</a>
					<a ng-if="pagedata.merch" class="fui-list" href="javascript:;">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="subtitle" >
								<span style="overflow: hidden;display: inline-block;">商户</span>
								<span class='realname'>{{pagedata.merch.merchname}}</span>
								
							</div>
							<div class="text address">地址： {{pagedata.merch.address || '无'}}</div>
						</div>
						<div class="fui-list-angle">
							<div class="angle"></div>
						</div>
					</a>
	</div>
	<div ng-show="pagedata.post.sendtype==2 || pagedata.post.sendtype==3" class="fui-cell-group" id="memberInfo">
                <div class="fui-cell">
                    <div class="fui-cell-label">联系人</div>
                    <div class="fui-cell-info c000"><input type="text" placeholder="请输入联系人" class="fui-input" ng-model="pagedata.post.realname"/></div>
                </div>
                <div class="fui-cell">
                    <div class="fui-cell-label">联系电话</div>
                    <div class="fui-cell-info c000"><input type="tel" placeholder="请输入联系电话"  class="fui-input" ng-model="pagedata.post.mobile"/></div>
                </div>
    </div>
	<div ng-if="pagedata.showstore_no==1" class="fui-cell-group" id="memberInfo">
          <div class="fui-cell">
              <div class="fui-cell-label">{{pagedata.store_notitle}}</div>
              <div class="fui-cell-info c000"><input type="text" placeholder="请输入{{pagedata.store_notitle}}" class="fui-input" ng-model="pagedata.post.store_no"/></div>
          </div>
    </div>
<div class="fui-list-group"  style="margin-top:0">
    <div ng-repeat="g in pagedata.order.list" class="fui-list goods-item align-start">
        <div class="fui-list-media">
            <a href="javascript:;" ng-click="access_json('/goods.detail//id='+g.id)">
                <img class="round" ng-src="{{tomedia(g.image)}}">
            </a>
        </div>
        <div class="fui-list-inner" style="height:auto">
            <a href="javascript:;" ng-click="access_json('/goods.detail//id='+g.id)">
                <div class="subtitle">{{g.title}}</div>
                <div class="text" style="font-size:0.5rem" ng-if="g.optionid">套餐：{{g.optiondata || '默认规格'}}</div>
            </a>
			<!--上门区域完成-->
			<div ng-if="g.has_city==1" class='subtitle' style="color:#999">
				<span ng-if="g.isdispatcharea==0" class='fui-cell-label' style="width:auto">不上门区域:</span>
				<span ng-if="g.isdispatcharea!=0" class='fui-cell-label' style="width:auto">只上门区域:</span>
				<span ng-repeat="(ke,v) in g.citys" class="fui-tag fui-tag-red-o sale-tip">{{ke}}</span>
			</div>
			<div class='price'>
				<span class="bigprice text-danger">￥<span ng-if="!g.active.price" class='marketprice'>{{g.price}}</span><span ng-if="g.active.price" class='marketprice'>{{g.active.price}}</span> <span ng-if="g.active.title" class='red' style="font-size:0.65rem;font-weight:400"> {{g.active.title}}</span> <span ng-if="g.buyxiu_de_price>0" style="font-size:0.65rem;font-weight:400" class='red'>买家秀 -￥{{g.buyxiu_de_price}}</span></span>
				<span class="num bold">x {{g.total}}</span>
			</div>
        </div>
    </div>
    <script type="text/javascript">
        $(function(){
            $(".package-goods-img").height($(".package-goods-img").width());
        })
    </script> 
</div>
<div class="fui-cell-group">
    <div ng-repeat="gift in pagedata.gifts" class="fui-cell" style="padding:0 ">
            <div class="fui-list goods-item" style="width:100%;">
                <div class="fui-list-media image-media" style="position: initial;">
                    <a href="javascript:void(0);">
                        <img class="round" ng-src="{{tomedia(gift.image)}}" >
                    </a>
                </div>
                <div class="fui-list-inner">
                    <a href="javascript:void(0);">
                        <div class="text" style="color: #000">
                            {{gift.title}}<br /><span class="fui-label fui-label-danger">赠品</span>
                        </div>
                    </a>
                </div>
                <div class='fui-list-angle' ng-if="gift.price">
                    <span class="price" style="display: inline-block;font-size:.65rem;color: #000 ">&yen;<del class='marketprice'>{{gift.price}}</del></span>
                </div>
            </div>
    </div>
	<div class="fui-cell" ng-if="pagedata.post.invoice =='1'">
        <div class="fui-cell-label" style="width:100px">发票抬头</div>
        <div class="fui-cell-text bold r"><span style="color:red">电子</span>({{pagedata.post.invoicegoodstype !=2?'服务明细':'服务类别'}}-{{pagedata.post.fapiaotype2 !=2?'个人':'单位'}})</div>
		<div class="fui-cell-remark" ng-click="pagedata.showfapiao=true"></div>
    </div>
	<div id='coupondiv' class="fui-cell fui-cell-click">
		<div class='fui-cell-label' style='width:auto;'>优惠券</div>
		<div class='fui-cell-text bold r'>{{pagedata.post.title5}}</div>
		<div class="fui-cell-remark" onclick="$('#showcoupon').modal();">
			<div ng-if="pagedata.coupons.length>1" class="badge">{{pagedata.coupons.length}}</div>
			<span ng-if="pagedata.coupons.length<=0" class='text'>{{pagedata.order.exitnomerch?'无该商户可用优惠券':'无可用'}}</span>
		</div>
	</div>
	<div class="fui-cell" onclick="$('#showremark').modal();">
        <div class="fui-cell-label" style="width:100px">简单故障描述</div>
        <div class="fui-cell-text bold r"><span ng-model="pagedata.item.remark" style="color:red">*</span>({{pagedata.post.remark || '情况描述'}})</div>
		<div class="fui-cell-remark" ></div>
    </div>
</div>
<div ng-include="sys_html('common/_diyform',true)"></div>
<div class="fui-cell-group">
	<div class="fui-cell">
			<div class="fui-cell-label" style="width:100px">服务金额</div>
			<div class="fui-cell-info"></div>
			<div class="fui-cell-remark noremark bold">&yen; <span class='dispatchprice'>
			{{price(pagedata.order.total_price) || '0.00'}}
			</span></div>
	</div>
	<div ng-if="pagedata.order.taskdiscountprice" class="fui-cell istaskdiscount">
        <div class="fui-cell-label" style='width:auto' >任务活动优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showtaskdiscountprice' class='dispatchprice'>{{pagedata.order.taskdiscountprice}}</span></div>
    </div>
    <div ng-if="pagedata.order.taskcut>0" class="fui-cell taskcut" >
        <div class="fui-cell-label" style='width:auto' >任务中心优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showtaskcut' class='dispatchprice'>{{pagedata.order.taskcut}}</span></div>
    </div>
    <div ng-if="pagedata.order.lotterydiscountprice>0" class="fui-cell islotterydiscount">
        <div class="fui-cell-label" style='width:auto' >游戏活动优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showlotterydiscountprice' class='dispatchprice'>{{pagedata.order.lotterydiscountprice}}</span></div>
    </div>
    <div ng-if="pagedata.order.level_de_price>0" class="fui-cell discount">
        <div class="fui-cell-label" style='width:auto' >会员优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.level_de_price)}}</span></div>
    </div>
	<div ng-if="pagedata.order.luck_de_price>0" class="fui-cell discount">
        <div class="fui-cell-label" style='width:auto' >运势优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.luck_de_price)}}</span></div>
    </div>
	<div ng-if="pagedata.order.buyxiu_de_price>0" class="fui-cell discount">
        <div class="fui-cell-label" style='width:auto' >买家秀优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.buyxiu_de_price)}}</span></div>
    </div>
    <div ng-if="pagedata.order.isdiscountprice>0" class="fui-cell isdiscount">
        <div class="fui-cell-label" style='width:auto' >促销优惠</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showisdiscountprice' class='dispatchprice'>{{price(pagedata.order.isdiscountprice)}}</span></div>
    </div>
    <div ng-if="pagedata.saleset.enough.length>0" class="fui-cell" id="deductenough">
		<div class="fui-cell-label" style='width:auto' >商城优惠 <span style="font-size: .6rem">：单笔满 ￥<span id="deductenough_enough">{{pagedata.order.enough.man}}</span> 元立减￥{{pagedata.order.enough.jian}}</span></div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{price(pagedata.order.enough.jian)}}</span></div>
	</div>
	<div ng-if="pagedata.order.sale_enough.length>0" class="fui-cell" id="merch_deductenough">
		<div class="fui-cell-label" style='width:auto' >单笔满 <span id="merch_deductenough_enough" class='text-danger'>{{pagedata.order.sale_enough[0].man}}</span> 元立减</div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{price(pagedata.order.sale_enough[0].jian)}}</span></div>
	</div>
	<div ng-if="pagedata.order.deduct_credit>0" class="fui-cell discount">
        <div class="fui-cell-label" style='width:auto' >积分抵扣（消耗积分<span class="red">{{pagedata.order.delcredit1}}</span>）</div>
        <div class="fui-cell-info"></div>
        <div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.deduct_credit)}}</span></div>
    </div>
	<div ng-if="pagedata.order.seckillprice" class="fui-cell" id="seckillprice">
		<div class="fui-cell-label" style='width:auto' >秒杀优惠</div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{price(pagedata.order.seckillprice)}}</span></div>
	</div>
	<div ng-if="pagedata.order.packageprice" class="fui-cell" id="showpackageprice">
		<div class="fui-cell-label" >套餐优惠</div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark bold">
			&yen; <span class='packageprice'>-{{price(pagedata.order.packageprice)}}</span>
		</div>
	</div>
	<div ng-if="pagedata.post.couponid" class="fui-cell">
		<div class="fui-cell-label" style='width:auto' >{{pagedata.post.title5}}(优惠券)</div>
		<div class="fui-cell-info"></div>
		<div ng-if="pagedata.post.backtype!=1" class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{pagedata.post.deduct}}</span></div>
		<div ng-if="pagedata.post.backtype==1" class="fui-cell-remark noremark bold"><span class='dispatchprice'>{{pagedata.post.discount}}</span>折</div>
	</div>
	<div ng-if="pagedata.order.credit" class="fui-cell">
		<div class="fui-cell-label">送积分</div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark bold">
			<span class='packageprice'>{{pagedata.order.credit}}个</span>
		</div>
	</div>
	<div ng-if="pagedata.order.fang_credit2>0" class="fui-cell">
		<div class="fui-cell-label">返现</div>
		<div class="fui-cell-info"></div>
		<div class="fui-cell-remark noremark bold">
			<span class='packageprice'>￥{{pagedata.order.fang_credit2}}</span>
		</div>
	</div>
</div>
</div>
<div id="showdelivery"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0;">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">上门</div>
				</div>
				<div class="fui-cell">
					<div class="tag">
						<span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.sendtype==1}" style="margin-right:10px;" ng-click="pagedata.post.sendtype=1">快递上门</span><span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.sendtype==2}" style="margin-right:10px;" ng-click="pagedata.post.sendtype=2">上门自提</span>
					</div>
				</div>
			</div>
			<div ng-if="pagedata.post.sendtype !=2" class="fui-cell-group" style="margin-top:-10px">
					<div class="fui-cell">
						<div class="fui-cell-label" style="width:100px">上门时间</div>
						<div class="fui-cell-text bold r"><span style="color:red">预计</span>({{pagedata.post.deliverytime}}上门)</div>
						<div class="fui-cell-remark" onclick="$('#showsendtime').modal();" ng-click=""></div>
					</div>
			</div>
			<div ng-if="pagedata.post.sendtype ==2" class="fui-cell-group" style="margin-top:-10px">
					<div class="fui-cell">
						<div class="fui-cell-label" style="width:100px">自提地点</div>
						<div class="fui-cell-text bold r"><span style="color:red">{{pagedata.selectstore.pcd.city}}</span>({{pagedata.selectstore.pcd.district}} {{pagedata.selectstore.pcd.street}} {{pagedata.selectstore.address}})</div>
						<div class="fui-cell-remark" onclick="$('#showstores').modal();"></div>
					</div>
			</div>
			<div class="fui-navbar">
				<a aria-hidden="true" data-dismiss="modal" href="javascript:;" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('order/common/_fapiao','','','jy_weishop')"></div>
<div id="showcoupon"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div ng-include="sys_html('coupon/common/_picker','','','jy_weishop')"></div>
		</div>
	</div>
</div>
<div id="showremark"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">简单服务描述</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.remark"></textarea>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;"  aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.modal_address==1" class="popup">
	<div class="popup-body">
		<div class="popup-bottom" style="padding-bottom:2.5rem">
		<i class="closed icon icon-close" style="color:red;top:0.3rem" ng-click="pagedata.modal_address=0"></i>
		<div class="fui-list-group modal-swiper-y" style='margin-top:5px;background:#fff'>
			<div class="fui-list address-item" ng-repeat="item in pagedata.address_list">
				
				<div class="fui-list-inner">
					<div class="title" ng-click="pagedata.change_address(item)"><span class='realname'>{{item.name}}</span> <span class='mobile'>{{item.mobile}}</span></div>
					<div class="text" ng-click="pagedata.change_address(item)"><span class='address'>{{item.province}} {{item.city}} {{item.district}} {{item.address}}</span></div>
					<div class='bar' style="line-height:1.4">
						<span class='pull-right'>
							<a class="external" href="javascript:;" ng-click="pagedata.edit_address=1;pagedata.item.address=item;pagedata.isaddaddress=0">
							<i class='icon icon-bianji'></i> 编辑
							</a>
							<a class='external' href="javascript:;" ng-click="pagedata.del_address($index)">
							<i class='icon icon-shanchu'></i> 删除
							</a>
						</span>
						<label class='radio-inline'  ng-click="pagedata.setaddress($index);pagedata.change_address(item)">
							<input type="radio" class="fui-radio  fui-radio-danger" ng-checked="item.isdefault==1"/> 设置默认
						</label>
					</div>
				</div>
			</div>
		</div>
		<div class='fui-navbar'>
			<a class="nav-item btn btn-danger external" ng-click="pagedata.edit_address=1;pagedata.post.address.address='';pagedata.isaddaddress=1"><i class="icon icon-tianjia" style="font-size:32rpx"></i> 添加地址</a>
		</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.edit_address==1" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<div class='fui-cell-group modal-swiper-y'>
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">添加地址</div>
					<div class='fui-cell-info'></div>
					<div class="fui-cell-remark" ng-if="pagedata.openid && pagedata.isaddaddress==1"><span ng-click="pagedata.openAddress()">添加微信地址</span></div>
				</div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>联系人</div>
                    <div class='fui-cell-info'><input type="text" ng-model="pagedata.item.address.name" placeholder="联系人" class="fui-input"/></div>
                </div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>联系电话</div>
                    <div class='fui-cell-info'><input type="tel" ng-model="pagedata.item.address.mobile" placeholder="联系电话"  class="fui-input"/></div>
                </div>
                <div class="fui-cell">
					<div class="fui-cell-label ">地区</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.item.address.pcd.province" class="form-control tpl-province">
						<option value="" selected="selected">省份</option>
						<option ng-repeat="(value,data) in pagedata.province" value="{{value}}" ng-selected="pagedata.item.address.pcd.province==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.item.address.pcd.city" class="form-control tpl-city">
						<option value="" selected="selected">城市</option>
						<option ng-repeat="(value,data) in pagedata.province[pagedata.item.address.pcd.province]" value="{{value}}" ng-selected="pagedata.item.address.pcd.city==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.item.address.pcd.district" class="form-control tpl-district">
						<option value="" selected="selected">区县</option>
						<option ng-repeat="(value,data) in pagedata.province[pagedata.item.address.pcd.province][pagedata.item.address.pcd.city]" value="{{value}}" ng-selected="pagedata.item.address.pcd.district==value">{{value}}</option>
						</select>
					</div>
					<div class="fui-cell-label" style="width:28%">
						<select ng-model="pagedata.item.address.pcd.street" class="form-control tpl-district">
						<option value="" selected="selected">街道</option>
						<option ng-repeat="value in pagedata.province[pagedata.item.address.pcd.province][pagedata.item.address.pcd.city][pagedata.item.address.pcd.district]" value="{{value}}" ng-selected="pagedata.item.address.pcd.street==value">{{value}}</option>
						</select>
					</div>
				</div>
                <div class='fui-cell'>
                    <div class='fui-cell-label'>详细地址</div>
                    <div class='fui-cell-info'><input type="text" ng-model="pagedata.item.address.address" placeholder='街道，楼牌号等'  class="fui-input"/></div>
                </div>
            </div>
			<div class="fui-navbar">
				<a href="javascript:;" ng-click="pagedata.add_address();" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
			<i ng-click="pagedata.edit_address=0" class="closed icon icon-cuowu"></i>
		</div>
	</div>
</div>
<div class="fui-navbar order-create-checkout">
    <a href="javascript:;" class="nav-item total" style="text-align:left;padding-left:0.5rem">
        <span ng-show="pagedata.post.sendtype==1" class="text-danger bigprice">&yen; 
			<span class="totalprice" style="font-size:1.2rem">{{price(pagedata.post.endprice) || '0.00'}}</span>
		</span>
		<span ng-show="pagedata.post.sendtype!=1" class="text-danger bigprice">&yen; 
			<span class="totalprice" style="font-size:1.2rem">{{price(pagedata.post.no_dispatch_price) || '0.00'}}</span>
		</span>
    </a>
    <a href="javascript:;" class="nav-item btn buybtn" ng-if="!pagedata.order_id && ((pagedata.order.no_out_price==0 && pagedata.order.outarea!=1) || pagedata.post.sendtype!=1)" ng-click="pagedata.pay_submit(pagedata.post,'jy_mfuwu/app.order.create/post/','/app.order.list//fromcreate=1')" >
		<div class="fee-tagup-nav">
			立即支付
		</div>
	</a>
	<a href="javascript:;" class="nav-item btn buybtn" ng-if="pagedata.order_id" ng-click="access_json('/app.order.detail//id='+pagedata.order_id+'&fromcreate=1')" >
		<div class="fee-tag-nav">
			查看订单
		</div>
	</a>
	<a href="javascript:;" class="nav-item btn buybtn" ng-if="(pagedata.order.no_out_price>0 || pagedata.order.outarea==1) && pagedata.post.sendtype==1">
		<div class="fee-disabled-nav">
			{{pagedata.order.no_out_price>0 && pagedata.order.outarea!=1?'满'+pagedata.order.no_out_price+'元起送':''}}
			{{pagedata.order.isnocity==1?'不在同城':'超出上门范围'}}
			{{pagedata.order.maxout_juli && pagedata.order.isnocity==1 ?pagedata.order.maxout_juli+'km':''}}
		</div>
	</a>
</div>
<div id="showstoreitem"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">{{pagedata.storeitem.title}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">地址：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.pcd.province}} {{pagedata.storeitem.pcd.city}} {{pagedata.storeitem.pcd.district}} {{pagedata.storeitem.pcd.street}} {{pagedata.storeitem.address}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">联系人：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.realname}}</div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">联系电话：</div>
					<div class="fui-cell-info">{{pagedata.storeitem.mobile}}</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;"  aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">关闭</a>
			</div>
		</div>
	</div>
</div>
<div id="showstores"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-list-group"  id="carrierInfo" style="margin: 0">
					<a class="fui-list"  ng-repeat="item in pagedata.carrier_list" href="javascript:;" ng-click="pagedata.selectstores(item.id);pagedata.selectstore = item;">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="subtitle" >
								<span style="overflow: hidden;display: inline-block;">线下门店</span>
								<span class='realname'>{{item.title}}</span>
								
							</div>
							<div class="text address">地址：<span style="color:red">{{item.pcd.province}}</span>({{item.pcd.district}} {{item.pcd.street}} {{item.address}})</div>
						</div>
						<div class="fui-list-angle">
							<div class="angle"></div>
						</div>
					</a>
			</div>
		</div>
	</div>
</div>
<!-- 放弃付款-->
<div ng-if="pagedata.checkcancel" class="popup">
			<div class="popup-body">
			<div class="popup-center" style="border-radius:0.2rem;">
				<div class="fui-page-title" style="margin-top:1rem">确定要取消订单吗？</div>
				<div class="fui-page-subtitle" style="margin-top:0.1rem">喜欢的服务可能随时会被抢空哦</div>
				<div class="modal-footer" style="margin-top:2rem">
					<a ng-click="pagedata.checkcancel=false" class="mod-fail">取消</a>
					<a href="javascript:" ng-click="post({},'cancel','id='+pagedata.order.id);pagedata.checkcancel=false" class="mod-success" style="background:red">确定</a>
				</div>
			</div>
			</div>
</div>
<div id="selecttime" class="modal fade" tabindex="-1" style="z-index: 99999; display: none;">
	<div class="modal-dialog" style="width:100%;bottom:0%;left:0%;">
	<div class="modal-content" style="border-radius: 4px;">
		<div aria-hidden="true" data-dismiss="modal" class="closebtn" style="color:#ddd;top:0.2rem;right:0.2rem"><i class="icon icon-wrong" style="font-size:1.3rem;"></i></div>
		<div class="fui-line" style="width:6rem;margin:0.5rem auto 0 auto">
			<div class="text green" style="background-color:#fff" >请选择{{pagedata.post.sendtype==3?'自取':''}}时间</div>
		</div>
		<div class="row margin0">
			<div class="col-xs-3">
				<div class="parent-category" id="delivery-time-parent">
					<ul>
							<li ng-class="{'active':pagedata.post.dayid==$index}" ng-repeat="(key,value) in pagedata.out_time.days"><a href="javascript:;" ng-click="pagedata.post.dayid=$index">{{value}}</a></li>
					</ul>
				</div>
			</div>
			<div class="col-xs-9" style="padding-left:0;padding-bottom:1rem">
				<div class="children-category" id="delivery-time-children">
					<div class="children-category-wrapper">
						<ul id="category1" aria-hidden="true" data-dismiss="modal" style="height:19rem">
								<li ng-show="pagedata.out_time.lasttimebox != 0 || pagedata.post.dayid!=0" class="time-flag"><a href="javascript:;" ng-click="pagedata.post.out_time=pagedata.predict_time">尽快{{pagedata.post.sendtype==3?'自取':'上门'}}</a></li>
								<li ng-show="pagedata.out_time.lasttimebox != 0 || pagedata.post.dayid!=0" class="delivery-tips time-flag" style="color:#09ba07">约{{pagedata.predict_time}}{{pagedata.post.sendtype==3?'自取':'上门'}}</li>
								<li ng-repeat="item in pagedata.out_time.times" ng-click="pagedata.post.out_time=item.timev" ng-class="{'hide init-hide':(item.timestamp <= pagedata.timestamp && pagedata.post.dayid==0)}">
									<a href="javascript:;">{{item.timev}}</a>
								</li>
								<div class="content-empty" ng-show="pagedata.out_time.lasttimebox == 0 && pagedata.post.dayid==0">
									  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;font-size:1.6rem"></i><br/><p style="color: #999;font-size: .75rem">当天没有{{pagedata.post.sendtype==3?'自取':'上门'}}时间段！</p>
								</div>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
</div>
<script language='javascript'>
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	var str = /^[1][3,4,5,7,8][0-9]{9}$///手机
    var strname =  /^[\u4e00-\u9fa5]+(·[\u4e00-\u9fa5]+)*$/ //中文
    var stremail = /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
    var filedata = scope.pagedata.post.diyfields?scope.pagedata.post.diyfields:[]
	for (var i=0;i<filedata.length;i++){
		if((filedata[i].ismust ==1 || filedata[i].ismust ==1) && !filedata[i].data){
			scope.message(filedata[i].title +'-不能为空！','error');
			return false
		}
		if(filedata[i].type ==8 && (filedata[i].ismust ==1 || filedata[i].ismust ==1)){
			if(!(str.test(filedata[i].data))){
			  scope.message("请输入正确的手机号码！",'error')
			   return false;
			}
		}
		if(filedata[i].type ==9 && (filedata[i].ismust ==1 || filedata[i].ismust ==1)){
			if(!(stremail.test(filedata[i].data))){
			  scope.message("请输入正确的邮箱！",'error')
			   return false;
			}
		}
	}
	if(scope.pagedata.mid==0 && post.sendtype==1){
		if(!(str.test(post.address.mobile))){
				  scope.message("请输入正确的手机号码！",'error')
				  return false;
		}
		if(!post.address.name){
				  scope.message("请输入收货人！",'error')
				  return false;
		}
		if(!post.address.address){
				  scope.message("请输入正确的收货地址！",'error')
				  return false;
		}
	}
	console.log(post);
	scope.post_json(post_url,post,function(result){
		scope.pagedata.order_id=result.order_id;
		var success_url=result.success_url?result.success_url:complete_url
		var error_url=result.error_url?result.error_url:complete_url
		scope.$evalAsync();
		var onemerchid=scope.pagedata.onemerchid;
		scope.tool.pay(result.pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success',success_url);
				}else{
					scope.message('支付失败！','success',error_url);
				}
		},'','',success_url,error_url,onemerchid);
	});
}
// 百度地图API功能
window.scope.location(function(res){
	scope.pagedata.item.address=scope.pagedata.item.address?scope.pagedata.item.address:{}
	if(!scope.pagedata.item.address.pcd){
			scope.pagedata.item.address.pcd={}
			scope.pagedata.item.address.pcd.province = res.addressComponents.province;
			scope.pagedata.item.address.pcd.city = res.addressComponents.city;
			scope.pagedata.item.address.pcd.district = res.addressComponents.district;
			scope.pagedata.item.address.pcd.street = res.addressComponents.street;	
			scope.pagedata.post.address.pcd=scope.pagedata.item.address.pcd
	}
	if(scope.pagedata.juli>0 && scope.pagedata.post.sendtype==1){
		scope.pagedata.jl(res.lat_lng);
	}
	if(!scope.pagedata.post.merchid){
		scope.pagedata.getstores(res.lat_lng);
	}
});
scope.pagedata.getstores=function(lat_lng){
	var id=scope.pagedata.order.list[0].id;
	scope.post_json('/get_data/getstores/',{'lat_lng':lat_lng,'id':id},function(res){
			scope.pagedata.stores =res.stores
			if(res.stores && res.stores.length>0){
				scope.pagedata.carrier_list=res.stores;
			}
			scope.pagedata.stores_count =res.stores_count
			scope.$evalAsync();
	});
}
scope.pagedata.jl=function(lat_lng){
	scope.post_json('/app.order.create/juli/',{'lat_lng':lat_lng,'juli':scope.pagedata.juli},function(res){
			if(res=='success'){
				
			}
	});
}
scope.pagedata.setaddress=function(index){
	var id =scope.pagedata.address_list[index].id
	scope.get('core/member.address/set/id='+id+'&get=1',function(res){
		for(var i in scope.pagedata.address_list){
				scope.pagedata.address_list[i].isdefault=0
		}
		scope.pagedata.address_list[index].isdefault=1
		scope.pagedata.post.addressid=id
		scope.pagedata.modal_address=0;
		scope.message('设置成功');
		scope.$evalAsync();
	});
}
scope.pagedata.del_address=function(index){
	var id =scope.pagedata.address_list[index].id
	scope.get('core/member.address/del/id='+id+'&get=1',function(res){
		scope.pagedata.address_list.splice(index,1);
		scope.message('删除成功');
		scope.$evalAsync();
	});
}
scope.pagedata.get_addresslist=function(){
	scope.pagedata.item.address.res=1
	scope.get('core/member.address/',function(res){
		scope.pagedata.address_list=res.list;
		scope.pagedata.modal_address=1;
		scope.$evalAsync();	
	});
}
scope.pagedata.add_address=function(){
	scope.pagedata.item.address.res=1
	if(scope.pagedata.isaddaddress==1){
		scope.pagedata.item.address.id=0;
	}
	scope.pagedata.post.address=scope.pagedata.item.address;
	scope.post_json('core/member.address/post/',scope.pagedata.item.address,function(res){
			console.log(res);
			scope.pagedata.post.addressid =res;
			scope.get('jy_mfuwu/app.order.create/get_freight/showbaoyou=1&addressid='+res+'&merchid='+scope.pagedata.post.merchid,function(freight){
				console.log(freight);
				scope.pagedata.post.endprice=parseFloat(scope.pagedata.order.no_dispatch_price2)+parseFloat(freight.fee);
				scope.pagedata.order.dispatchprice=freight.fee;
				scope.pagedata.post.dispatchprice=freight.fee;
				scope.pagedata.order.addbaoyoufee=freight.addbaoyoufee;
				scope.pagedata.order.isonebaoyou=freight.isonebaoyou;
				scope.pagedata.edit_address=0;
				scope.pagedata.modal_address=0;
				scope.pagedata.order.is_peisong=freight.is_peisong==1?freight.is_peisong:0;
				scope.pagedata.post.is_peisong=scope.pagedata.order.is_peisong;
				if(scope.pagedata.sendtypes[1]){
					scope.pagedata.sendtypes[1]=scope.pagedata.order.is_peisong==1?'同城上门':'快递上门';
				}
				if(scope.pagedata.post.endprice<=0){
					scope.pagedata.post.endprice=0.00;
				}
				scope.pagedata.order.outarea=freight.outarea;
				scope.pagedata.order.isnocity=freight.iscity==1?0:1;
				scope.pagedata.order.no_out_price=freight.no_out_price?freight.no_out_price:0;
				scope.pagedata.order.baoyou_man=freight.baoyou_man?freight.baoyou_man:0;
				scope.pagedata.order.peisong_juli=freight.juli?freight.juli:scope.pagedata.order.peisong_juli;
				scope.$evalAsync();
			});
	});
}
scope.pagedata.change_address=function(res){
	console.log(res);
	scope.pagedata.post.address=res;
	scope.pagedata.post.addressid=res.id;
	scope.get('jy_mfuwu/app.order.create/get_freight/showbaoyou=1&addressid='+res.id+'&merchid='+scope.pagedata.post.merchid,function(freight){
		console.log('change_address');console.log(freight);
		scope.pagedata.post.endprice=parseFloat(scope.pagedata.order.no_dispatch_price2)+parseFloat(freight.fee);
		scope.pagedata.order.dispatchprice=freight.fee;
		scope.pagedata.post.dispatchprice=freight.fee;
		scope.pagedata.order.addbaoyoufee=freight.addbaoyoufee;
		scope.pagedata.order.isonebaoyou=freight.isonebaoyou;
		scope.pagedata.modal_address=0;
		scope.pagedata.order.is_peisong=freight.is_peisong==1?freight.is_peisong:0;
		scope.pagedata.post.is_peisong=scope.pagedata.order.is_peisong;
		if(scope.pagedata.sendtypes[1]){
			scope.pagedata.sendtypes[1]=scope.pagedata.order.is_peisong==1?'同城上门':'快递上门';
		}
		if(scope.pagedata.post.endprice<=0){
			scope.pagedata.post.endprice=0.00;
		}
		scope.pagedata.order.outarea=freight.outarea;
		scope.pagedata.order.isnocity=freight.iscity==1?0:1;
		scope.pagedata.order.no_out_price=freight.no_out_price?freight.no_out_price:0;
		scope.pagedata.order.baoyou_man=freight.baoyou_man?freight.baoyou_man:0;
		scope.pagedata.order.peisong_juli=freight.juli?freight.juli:scope.pagedata.order.peisong_juli;
		scope.$evalAsync();
				
	});
	
}
scope.pagedata.showstoreitem=function(){
	$('#showstoreitem').modal();
}
scope.pagedata.selectstores=function(id){
	console.log('选择门店'+id);
	scope.pagedata.post.storeid = id;
	$('#showstores').modal('hide');
}
scope.pagedata.checkcoupon=function(type){
	if(type){
		if(scope.pagedata.post.backtype!=1){
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price - scope.pagedata.post.deduct
			if(scope.pagedata.post.no_dispatch_price<0){
				scope.pagedata.post.no_dispatch_price=0
			}
			scope.pagedata.post.endprice = scope.pagedata.order.endprice - scope.pagedata.post.deduct
			if(scope.pagedata.post.endprice<0){
				scope.pagedata.post.endprice=0
			}
		}else{
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price * scope.pagedata.post.discount / 10;
			if(scope.pagedata.post.no_dispatch_price<0){
				scope.pagedata.post.no_dispatch_price=0
			}
			scope.pagedata.post.endprice = scope.pagedata.order.endprice * scope.pagedata.post.discount/10
			if(scope.pagedata.post.endprice<0){
				scope.pagedata.post.endprice=0
			}			
		}
	}else{
		scope.pagedata.post.couponid=0;
		if(scope.pagedata.post.backtype!=1){
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price
			scope.pagedata.post.endprice = scope.pagedata.order.endprice
		}else{
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price;
			scope.pagedata.post.endprice = scope.pagedata.order.endprice		
		}
	}
	$('#showcoupon').modal('hide');
	scope.$evalAsync();
}
scope.pagedata.selecttime=function(){
	$('#selecttime').modal();
	var store_id=scope.pagedata.post.storeid
	scope.get('jy_mfuwu/index/out_time/store_id='+store_id+'&out_pay='+scope.pagedata.order.dispatchprice,function(res){
		scope.pagedata.out_time=res.out_time;
		scope.pagedata.predict_time=res.predict_time;
		scope.pagedata.post.out_time=scope.pagedata.post.out_time?scope.pagedata.post.out_time:res.predict_time
		scope.pagedata.timestamp=res.timestamp;
		scope.$evalAsync();
	});
}
scope.pagedata.openAddress=function (){
	wx.openAddress({
		  success: function (res) {
			scope.pagedata.item.address={}
			scope.pagedata.item.address.name = res.userName; // 收货人姓名
			scope.pagedata.item.address.pcd={}
			scope.pagedata.item.address.pcd.province = res.provinceName; // 国标收货地址第一级地址（省）
			scope.pagedata.item.address.pcd.city = res.cityName; // 国标收货地址第二级地址（市）
			scope.pagedata.item.address.pcd.district = res.countryName; // 国标收货地址第三级地址（国家）
			scope.pagedata.item.address.address = res.detailInfo; // 详细收货地址信息
			scope.pagedata.item.address.mobile = res.telNumber; // 收货人手机号码
			scope.$evalAsync();
		  },
		  fail: function (res) {
			console.log('fail');console.log(res)
		  }
	});
}
$("input,select").blur(function(){
        setTimeout(function() {
                var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
                window.scrollTo(0, Math.max(scrollHeight - 1, 0));
            }, 100);
})
scope.pagedata.getprovince=function(){
	scope.get('jy_weishop/get_data/getprovince/',function(res){
		scope.pagedata.province=res.province;
		scope.$evalAsync();
	});
}
scope.pagedata.getprovince();
</script>
</div>